<?php

use Illuminate\Routing\Router;


Route::group([
    'prefix' => 'admin/BrandRights',
    'namespace'     => 'Beerus\\Modules\\BrandRights\\Controllers',
    'middleware'    => ['web', 'admin'],
], function (Router $router) {
    //权益基础管理
    $router->get('/index','IndexController@index');
    $router->get('index/create','IndexController@create');
    $router->get('index/{id}/edit','IndexController@edit');
    $router->put('index/{id}','IndexController@sortWeight');
    $router->post('save','IndexController@save');
    $router->post('audit','IndexController@audit');
    $router->post('createSave','IndexController@createSave');//保存
    //套餐管理
    $router->get('pack','PackConfigController@index');
    $router->get('pack/create','PackConfigController@create');
    $router->get('pack/{id}/edit','PackConfigController@edit');
    $router->post('pack/save','PackConfigController@save');
    $router->post('pack/audit','PackConfigController@audit');
    $router->post('pack/createSave','PackConfigController@createSave');//保存
    $router->get('pack/{package_id}/sourceList','PackConfigController@sourceList');
    $router->any('pack/{package_id}/sourceList/{id}','PackConfigController@sourceSave');
    $router->post('pack/copy/{package_id}','PackConfigController@copyPackage');
    //品牌套餐查看

    $router->get('brandSource','BrandSourceController@index');
    $router->get('brandSource/{brand_id}','BrandSourceController@view');
    $router->get('brandSource/{brand_id}/create','BrandSourceController@create');
    $router->post('brandSource/save','BrandSourceController@save');
    $router->post('brandSource/audit','BrandSourceController@audit');

    $router->get('packageRightsLog','PackageRightsLogController@index');

    #等级权益源
    $router->get('levelrights','LevelRightsController@index');
    $router->get('levelrights/{id}/edit','LevelRightsController@edit');
    $router->post('levelrights/save','LevelRightsController@save');
    $router->put('levelrights/{id}','LevelRightsController@sortWeight');
});